<!--{assign var="menu_id" value="fans"}-->
<!--{include file="<!--{$oetplpath}-->block_header.tpl"}--> 
<!--{include file="<!--{$oetplpath}-->block_top.tpl"}-->
<!--{include file="<!--{$oetplpath}-->block_banner.tpl"}-->
<div class="oe_inmain"> 
  <!--{include file="<!--{$oetplpath}-->block_left.tpl"}-->
  <div class="right">
    <div class="oe_ufriend">
      <div class="oe_unav"> 谁关注了我 </div>
      <div class="oe_utitle">
        <ul>
          <li><a href="<!--{$oefile}-->&c=fans" class="current">谁关注了我<em></em></a></li>
		  <li><a href="<!--{$oefile}-->&c=listen">我关注了谁</a></li>
        </ul>
        <div class="clear"></div>
      </div>
      
      <div class="fans_list">

        <div class="total_tips">
          <p class="text">
            共有 <b><!--{$total}--></b> 人关注了你！<br>
			完善个人资料和升级会员可提高人气哦！~
          </p>
          <div class="btn">
            <span class="span_1"><a href="<!--{$oefile}-->&c=vip">升级会员</a></span>
            <span class="span_2"><a href="<!--{$oefile}-->&c=profile">完善资料</a></span>
          </div>
		  <div class="clear"></div>
        </div>
        
		<!--{if empty($fans)}-->
        <div class="oe_nodata">
          <p class="p_1"><img src="<!--{$userskin}-->images/nodata.jpg" /></p>
          <p class="p_2">没有符合条件的信息！</p>
        </div>
		<!--{else}-->
        <div class="bd">
          <!--{foreach $fans as $volist}-->
          <dl>
            <dt>
			  <span><a href="<!--{$volist.homeurl}-->" target="_blank"><img src="<!--{$volist.headimg}-->" /></a></span>
			</dt>
            <dd>
              <h3>
			    <a href="<!--{$volist.homeurl}-->" target="_blank"><!--{$volist.username}--></a>
                <span><!--{$volist.visitmetime|date_format:"%Y/%m/%d %H:%M"}--></span>
				<!--{if $volist.isonline == '1'}-->
                <em></em>
				<!--{/if}-->
              </h3>
              <p class="p_1">
			    <!--{$volist.age}-->岁 <!--{area type="text" value=$volist.dist1}--> <!--{area type="text" value=$volist.dist2}--> 
				<!--{if $volist.height > 0}-->
				<!--{$volist.height}-->CM
				<!--{else}-->
				<!--{hook mod="var" item="marry" type="text" value=$volist.marry}-->
				<!--{/if}-->
			  </p>
              <p class="p_2">
                <span class="span_1 cursor" f="pop_send_msg" data-touid="<!--{$volist.userid}-->"><i></i>发私信</span>
				<!--{if $volist.isfriend == '1'}-->
                <span class="span_2 current"><i></i>已加好友</span>
				<!--{elseif $volist.isfriend == '2'}-->
                <span class="span_2 current"><i></i>已发申请</span>
				<!--{else}-->
				<span class="span_2 cursor" f="but_addto_friendapply" data-uid="<!--{$volist.userid}-->"><i></i>加为好友</span>
				<!--{/if}-->
              </p>
              <span class="del" style="display:none;"></span>
            </dd>
            <div class="clear"></div>
          </dl>
          <!--{/foreach}-->
          <div class="clear"></div>
        </div>
		<!--//bd End-->
		<!--{if $total > 0 && !empty($showpage)}-->
		<div class="oe_page"> <!--{$showpage}--> </div>
		<!--{/if}--> 
		<!--{/if}-->


      </div>
	  <!--//fans_list End-->
      
    </div>
  </div>
  <div class="clear"></div>
</div>

<!--{include file="<!--{$oetplpath}-->block_footer.tpl"}-->
<script type="text/javascript">
$(function(){
	//加为好友
	$(document).on("click", "[f='but_addto_friendapply']", function(){
		$obj_addto = $(this);
		$_uid = parseInt($(this).attr("data-uid"));
		if ($_uid > 0) {
			$.ajax({
				type: "POST",
				url: _ROOT_PATH + "index.php?m=user&c=friendapply",
				cache: false,
				data: {a:"apply", id:$_uid, r:get_rndnum(8)},
				dataType: "json",
				success: function($data) {
					$json = eval($data);
					$response = $json.response;
					$result = $json.result;
					if ($response == "1") {
						$obj_addto.addClass("current");
						$obj_addto.attr("data-uid", "");
						$obj_addto.html("<i></i>已发申请");
						ToastShow("已发好友申请，请等待对方确认！");
					}
					else {
						if ($result.length > 0) {
							ToastShow($result);
						}
						else {
							ToastShow("操作失败");
						}
					}
				},
				error: function() {
					ToastShow("系统繁忙，请稍后再试");
				}
			});

		}
	});
});
</script>
</body>
</html>